package org.smile.tomcat.session.redis;

import java.io.Serializable;
/**
 * 用于保存session的通用信息
 * @author 胡真山
 *
 */
public class RedisSessionInfo implements Serializable{
	
	private Long creationTime;
	
	public Long getCreationTime() {
		return creationTime;
	}
	
	public void setCreationTime(Long creationTime) {
		this.creationTime = creationTime;
	}
	/**
	 * 从session中赋值
	 * @param session
	 */
	public void initFrom(RedisSession session){
		this.creationTime=session.getCreationTime();
	}
	/**
	 * 把属性传到session中
	 * @param session
	 */
	public void toSession(RedisSession session){
		session.setCreationTime(this.creationTime);
	}

	@Override
	public String toString() {
		return "creationTime:"+this.creationTime;
	}
	
}
